Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New API endpoint for bulk/refresh all ACSs #1086

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

damoore044
Copy link
Contributor

@damoore044 damoore044 commented Jan 31, 2024

Description of addition

Functional demonstration

[SETUP] Multiple ACSs created and refreshed once, then ...

[IN] (Pdb) module_target_sat.api.AlternateContentSource().bulk_refresh_all()

[OUT] {'id': '39c86797-e657-491a-aa8d-a5b3f4d38727', 'label': 'Actions::BulkAction', 'pending': False, 
'action': 'Refresh Alternate Content Source refresh alternate content source; ...', 'username': 'admin', 
'started_at': '2024-01-31 19:27:06 UTC', 'ended_at': '2024-01-31 19:27:38 UTC', 'duration': '32.910878', 
'state': 'stopped', 'result': 'success', 'progress': 1.0, 'input': {'action_class': 'Actions::Katello::AlternateContentSource::Refresh', 'target_ids': [1, 2, 3, 4, 5, 6, 7], 'target_class': 
'Katello::AlternateContentSource', 'args': [], 'kwargs': {}, 'current_request_id': '4cb592d7-a0a1-4532-8c4b-b8b1d4c7f52b', 
'current_timezone': 'UTC', 'current_organization_id': None, 'current_location_id': None, 'current_user_id': 4, 
'dynflow': {}}, 'output': {'planned_count': 7, 'cancelled_count': 0, 'total_count': 7, 'failed_count': 0, 
'pending_count': 0, 'success_count': 7}, 'humanized': {'action': 'Refresh Alternate Content Source', 
'input': ['refresh alternate content source', '...'], 'output': '7 task(s), 7 success, 0 fail', 'errors': []}, 
'cli_example': None, 'start_at': '2024-01-31 19:27:06 UTC', 'available_actions': {'cancellable': False, 'resumable': False}}      

Refreshed ACSs:

image

Tasks found:

image

BulkAction main task (the Action Name is long):

BulkAction Task Name is just "Refresh Alternate Content Source refresh alternate content source refresh alternate ... "
A long string of the subtask(s) names appended to each other.
image

BulkAction sub-tasks:

image

@damoore044 damoore044 added CherryPick PR needs CherryPick to previous branches Stream 6.15.z labels Jan 31, 2024
@damoore044 damoore044 requested review from a team January 31, 2024 20:04
Copy link

codecov bot commented Jan 31, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (3605d7b) 92.15% compared to head (84b6666) 92.03%.

Files Patch % Lines
nailgun/entities.py 20.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1086      +/-   ##
==========================================
- Coverage   92.15%   92.03%   -0.12%     
==========================================
  Files           6        6              
  Lines        3047     3052       +5     
==========================================
+ Hits         2808     2809       +1     
- Misses        239      243       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JacobCallahan
Copy link
Member

@damoore044 is this ready for review?

vsedmik
vsedmik previously approved these changes Feb 12, 2024
Copy link
Contributor

@vsedmik vsedmik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, just add some test in nailgun/tests/test_entities.py.

cover new endpoint in test_entities.py
@vsedmik vsedmik merged commit 68976fe into SatelliteQE:master Feb 20, 2024
7 of 9 checks passed
github-actions bot pushed a commit that referenced this pull request Feb 20, 2024
cover new endpoint in test_entities.py

(cherry picked from commit 68976fe)
Gauravtalreja1 pushed a commit that referenced this pull request Feb 21, 2024
cover new endpoint in test_entities.py

(cherry picked from commit 68976fe)

Co-authored-by: David Moore <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.15.z CherryPick PR needs CherryPick to previous branches Stream
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants